<template>
	<view class="bg-white padding-sm">
		<web-view v-if="type=='URL'" :src="content"></web-view>
		<mp-html v-if="type=='HTML'" :show-img-menu="false" :content="content" />
	</view>
</template>

<script>
	
	export default {
		data() {
			return {
				type:"",
				content:"",
			}
		},
		onLoad(param) {
			this.type = param.type
			if(param.type == 'URL'){
				this.content = decodeURIComponent(param.content)
				if(uni.$common.isNotBlank(param.title)){
					uni.setNavigationBarTitle({
						title:param.title
					})
				}
			}else if(param.type == 'HTML'){
				this.content = decodeURIComponent(param.content)
				if(uni.$common.isNotBlank(param.title)){
					uni.setNavigationBarTitle({
						title:param.title
					})
				}
			}
		},
		methods: {
			
		}
	}
</script>

<style>

</style>
